package com.ddone.oss.config;

import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSClientBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author ddone
 * @date 2024/4/16-10:10
 */
@Configuration
public class OssConfig {

    @Bean
    public OSS ossClient(){
        return new OSSClientBuilder()
                .build(
                        OssProperties.ENDPOINT,
                        OssProperties.KEY_ID,
                        OssProperties.KEY_SECRET
                );
    }
}
